Skip to content

Add interactive Python REPL playground to docs#51

Draft
chrizzFTD wants to merge 6 commits into
developfrom
cursor/docs-playground-pyrepl-a03b
Draft

Add interactive Python REPL playground to docs#51
chrizzFTD wants to merge 6 commits into
developfrom
cursor/docs-playground-pyrepl-a03b

Conversation

@chrizzFTD

@chrizzFTD chrizzFTD commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a Playground documentation page with an embedded Pyodide REPL via sphinx-pyrepl-web, plus interactive autodoc REPLs on API pages.

Uses sphinx-pyrepl-web PR #26 (0.4.1) for comma-separated :project: package lists — no custom conf.py hooks required.

Changes

  • Pin sphinx-pyrepl-web to PR Create Many  #26 branch (cursor/project-package-lists-370c) for QC; switch to >=0.4.1 once released
  • Enable autodoc doctest REPLs with combined packages:
    pyrepl_autodoc_packages = ":project:,grill-usd-core==26.8,grill-names>=2.6.0"
  • Playground directive uses the same combined spec (in-tree wheel on RTD PR previews instead of pinned PyPI grill)
  • Auto-build wheel via :project: sentinel into _static/wheels/
  • Add playground to the toctree; sync documented version to 0.19.1

QC validation (PR #26)

  • sphinx-pyrepl-web 0.4.1 installs from PR branch
  • Clean docs build succeeds
  • Wheel auto-built: _static/wheels/grill-0.19.1-py3-none-any.whl
  • playground.html:project: resolved in directive :packages::
    packages="_static/wheels/grill-0.19.1-py3-none-any.whl, grill-usd-core==26.8, grill-names>=2.6.0"
    
  • api.html — 3 autodoc REPLs with same combined package list + bootstrap scripts
  • Full browser replay on RTD preview (manual — ~12 MB WASM USD load)

Notes

Once sphinx-pyrepl-web 0.4.1 lands on PyPI, replace the git URL in setup.cfg with sphinx-pyrepl-web>=0.4.1.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 4, 2026 13:24
Integrate sphinx-pyrepl-web with a new Playground page that embeds
a Pyodide REPL preloading grill-usd-core, grill-names, and grill.
The replay session walks through the end-to-end cook workflow from
the documentation examples.

Also bump documented version to 0.19.1 and pin sphinx>=9 for the
new extension dependency.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.37%. Comparing base (bbc2b8b) to head (a2bc515).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #51   +/-   ##
========================================
  Coverage    89.37%   89.37%           
========================================
  Files           13       13           
  Lines         3088     3088           
========================================
  Hits          2760     2760           
  Misses         328      328           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cursoragent and others added 4 commits July 7, 2026 14:38
Enable interactive doctest REPLs on API pages via the :project:
sentinel, which auto-builds the grill wheel at doc-build time.
Augment resolved packages with grill-usd-core and grill-names for
browser WASM compatibility.

Follows sphinx-pyrepl-web PR #25 and grill-names PR #35 patterns.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Drop custom REPL sizing rules and the _augment_pyrepl_packages conf.py
hook; extra autodoc package deps should be handled upstream in
sphinx-pyrepl-web.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Pin docs extra to the PR branch and use combined package specs for
autodoc REPLs and the playground directive, replacing the removed
conf.py augmentation hook and pinned PyPI grill version.

Validated: docs build succeeds; playground and api.html emit REPLs
preloading the auto-built grill wheel plus grill-usd-core and
grill-names.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Project root is auto-detected by walking up from docs/source/ to
the repo root (setup.cfg). Explicit override was unnecessary.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants